home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-ospf-nssa-option-01.txt < prev    next >
Text File  |  1993-10-20  |  42KB  |  989 lines

  1.  
  2.    Internet Draft            OSPF NSSA Option                  October 1993
  3.  
  4.  
  5.                            The OSPF NSSA Option
  6.  
  7.  
  8.  
  9.                    <draft-ietf-ospf-nssa-option-01.txt>
  10.  
  11.  
  12.                                 Rob Coltun
  13.                        RainbowBridge Communications
  14.                               (301) 340-9416
  15.                         rcoltun@rainbow-bridge.com
  16.  
  17.  
  18.                                Vince Fuller
  19.                                   BARRNet
  20.                             Stanford University
  21.                                Pine Hall 115
  22.                          Stanford, CA, 94305-4122
  23.                          vaf@Valinor.Stanford.EDU
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.      Status of this Memo
  31.  
  32.           This document is an Internet Draft. Internet Drafts  are  working
  33.           documents  of  the  Internet  Engineering  Task Force (IETF), its
  34.           Areas, and its Working Groups. Note that other  groups  may  also
  35.           distribute working documents as Internet Drafts).
  36.  
  37.           Internet Drafts are draft documents valid for a  maximum  of  six
  38.           months. Internet Drafts may be updated, replaced, or obsoleted by
  39.           other documents at any time. It is not appropriate to use  Inter-
  40.           net  Drafts as reference material or to cite them other than as a
  41.           "working draft" or "work in progress."
  42.  
  43.           Please check the I-D abstract listing contained in each  Internet
  44.           Draft  directory to learn the current status of this or any other
  45.           Internet Draft.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.    Coltun & Fuller           Expires May 1994                      [Page 1]
  63.  
  64.  
  65.  
  66.  
  67.  
  68.    Internet Draft            OSPF NSSA Option                  October 1993
  69.  
  70.  
  71.      Table Of Contents
  72.  
  73.           1.0 Abstract ................................................. 2
  74.           2.0 Overview ................................................. 2
  75.           2.1 Motivation ............................................... 2
  76.           2.2 Proposed Solution ........................................ 3
  77.           3.0 Implementation Details ................................... 5
  78.           3.1 The N-bit ................................................ 5
  79.           3.2 Type-7 Address Ranges .................................... 5
  80.           3.3 Type-7 LSAs .............................................. 6
  81.           3.4 Originating Type-7 LSAs .................................. 7
  82.           3.5 Calculating Type-7 AS External Routes .................... 8
  83.           3.6 Incremental Updates ...................................... 9
  84.           4.0 Originating Type-5 LSAs .................................. 10
  85.           4.1 Translating Type-7 LSAs .................................. 10
  86.           4.2 Flushing Translated Type-7 LSAs .......................... 11
  87.           5.0 Acknowledgements ......................................... 11
  88.           6.0 References ............................................... 11
  89.           Appendix A: Type-7 LSA Packet Format ......................... 13
  90.           Appendix B: The Options Field ................................ 13
  91.           Appendix C: Configuration Parameters ......................... 14
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.      1.0  Abstract
  99.  
  100.           This document describes a new optional type of OSPF  area,  some-
  101.           what  humorously referred to as a "not-so-stubby" area (or NSSA).
  102.           NSSAs are similar to the existing OSPF  stub  area  configuration
  103.           option  but have the additional capability of importing AS exter-
  104.           nal routes in a limited fashion.
  105.  
  106.      2.0  Overview
  107.  
  108.      2.1  Motivation
  109.  
  110.           Wide-area transit networks (such as the NSFNET  regionals)  often
  111.           have connections to moderately-complex "leaf" sites.  A leaf site
  112.           may have multiple IP network numbers assigned to it.
  113.  
  114.           Typically, one of the leaf site's networks is directly  connected
  115.           to  a  router  provided  and  administered by the transit network
  116.           while the others are distributed throughout and  administered  by
  117.           the  site.   From  the  transit network's perspective, all of the
  118.           network numbers associated with the site make up a single  "stub"
  119.           entity.   For example, BARRNet has one site composed of a class-B
  120.           network, 130.57.0.0, and a class-C  network,  192.31.114.0.  From
  121.           BARRNet's  perspective,  this  configuration looks something like
  122.           this:
  123.  
  124.  
  125.  
  126.  
  127.  
  128.    Coltun & Fuller           Expires May 1994                      [Page 2]
  129.  
  130.  
  131.  
  132.  
  133.  
  134.    Internet Draft            OSPF NSSA Option                  October 1993
  135.  
  136.  
  137.                     192.31.114
  138.                         |
  139.                       (cloud)
  140.                   -------------- 130.57.4
  141.                         |
  142.                         |
  143.                      ------ 131.119.13 ------
  144.                      |BR18|------------|BR10|
  145.                      ------            ------
  146.                                           |
  147.                                           V
  148.                                   to BARRNet "core" OSPF system
  149.  
  150.  
  151.           where the "cloud" consists of the subnets of 130.57  and  network
  152.           192.31.114,  all  of  which  are  learned  by RIP on router BR18.
  153.           Topologically, this cloud looks very much like an OSPF stub area.
  154.           The advantages of running the cloud as an OSPF stub area are:
  155.  
  156.              1. Type-5 routes (OSPF external link-state advertise-
  157.                 ments (LSAs)) are not advertised beyond the router
  158.                 labeled "BR10". This is advantageous because the
  159.                 link between BR10 and BR18 may be a low-speed link
  160.                 or the router BR18 may have limited resources.
  161.  
  162.              2. The transit network is abstracted to the "leaf"
  163.                 router BR18 by advertising only a default route
  164.                 across the link between BR10 and BR18.
  165.  
  166.              3. The cloud becomes a single, manageable "leaf" with
  167.                 respect to the transit network.
  168.  
  169.              4. The cloud can become, logically, a part of the transit
  170.                 network's OSPF routing system.
  171.  
  172.              5. Translated type-5 LSAs that are sent into the
  173.                 backbone from the cloud (which is a separate
  174.                 stub area) may be considered "leaf" nodes
  175.                 when performing the Dijkstra calculation.
  176.  
  177.           However, the current  definition  of  the  OSPF  protocol  [OSPF]
  178.           imposes topological limitations which restrict simple cloud topo-
  179.           logies from becoming OSPF stub areas.  In particular, it is ille-
  180.           gal  for a stub area to import routes external to OSPF; it is not
  181.           possible for routers BR18 and BR10 to both be members of the stub
  182.           area  and to import the routes learned from RIP or other IP rout-
  183.           ing protocols as type-5 (OSPF external LSAs) into the  OSPF  sys-
  184.           tem.   In order to run OSPF out to BR18, BR18 must be a member of
  185.           a non-stub area or the OSPF backbone to import routes other  than
  186.           its  directly-connected  network(s).   Since it is not acceptable
  187.           for BR18 to maintain all of BARRNet's external  (type-5)  routes,
  188.           BARRNet  is  forced by OSPF's topological limitations to run OSPF
  189.           out to BR10 and to run RIP between BR18 and BR10.
  190.  
  191.  
  192.  
  193.  
  194.    Coltun & Fuller           Expires May 1994                      [Page 3]
  195.  
  196.  
  197.  
  198.  
  199.  
  200.    Internet Draft            OSPF NSSA Option                  October 1993
  201.  
  202.  
  203.      2.2 Proposed Solution
  204.  
  205.           This document describes a new optional type of OSPF  area,  some-
  206.           what  humorously  referred to as a "not-so-stubby" area (or NSSA)
  207.           which has the capability of importing external routes in  a  lim-
  208.           ited fashion.
  209.  
  210.           The OSPF specification defines two general classes of area confi-
  211.           guration.   The first allows type-5 LSAs to be flooded throughout
  212.           the area.  In this configuration, type-5 LSAs may  be  originated
  213.           by  routers internal to the area or flooded into the area by area
  214.           border routers.  These areas, referred to herein as type-5  capa-
  215.           ble  areas  (or  just  plain  areas  in  the OSPF spec), are dis-
  216.           tinguished by the fact that they can carry transit traffic.   The
  217.           backbone  is  always  a  type-5 capable area.  The second type of
  218.           area configuration, called stub, allows no type-5 LSAs to be pro-
  219.           pagated  into/throughout  the area and instead depends on default
  220.           routing to external destinations.
  221.  
  222.           NSSAs are defined in much the same manner as existing stub areas.
  223.           To  support  NSSAs, a new option bit (the "N" bit) and a new type
  224.           of LSA (type-7) area defined.  The "N" bit ensures  that  routers
  225.           belonging  to an NSSA agree on its configuration.  Similar to the
  226.           stub area's use of the "E" bit, both NSSA neighbors must agree on
  227.           the  setting  of  the "N" bit or the OSPF neighbor adjacency will
  228.           not form.
  229.  
  230.           Type-7 LSAs  provide  for  carrying  external  route  information
  231.           within  an NSSA.  Type-7 AS External LSAs have virtually the same
  232.           syntax as the Type-5 AS External LSAs with the obvious  exception
  233.           of  the link-state type (see section 3.2 for more details). There
  234.           are two major semantic  differences  between  type-5  and  type-7
  235.           LSAs.
  236.  
  237.           o  Type-7 LSAs may be originated by and advertised
  238.              throughout an NSSA; as with stub areas, NSSA's do not
  239.              receive or originate type-5 LSAs.
  240.  
  241.           o  Type-7 LSAs are advertised only within a single NSSA;
  242.              they are not flooded into the backbone area or any
  243.              other area by border routers, though the information
  244.              which they contain can be propagated into the backbone
  245.              area (see section 3.6).
  246.  
  247.           In order to allow limited exchange of external information across
  248.           an  NSSA area border, NSSA border routers will translate selected
  249.           type-7 LSAs received from  the  NSSA  into  type-5  LSAs.   These
  250.           type-5  LSAs  will  be flooded to all type-5 capable areas.  NSSA
  251.           area border routers may be configured with address ranges so that
  252.           several type-7 LSAs may be represented by a single type-5 LSA.
  253.  
  254.           In addition, an NSSA area border router can originate  a  default
  255.           type-7 LSA (IP address of 0.0.0.0) into the NSSA.  Default routes
  256.           are  necessary  because  NSSAs  do  not  receive   full   routing
  257.  
  258.  
  259.  
  260.    Coltun & Fuller           Expires May 1994                      [Page 4]
  261.  
  262.  
  263.  
  264.  
  265.  
  266.    Internet Draft            OSPF NSSA Option                  October 1993
  267.  
  268.  
  269.           information  and   must  have  a  default  route  to route to AS-
  270.           external destinations.  Like stub areas, NSSAs may  be  connected
  271.           to  the backbone at more than one area border router, but may not
  272.           be used as a transit area.  Note  that  the  default  route  ori-
  273.           ginated  by an NSSA area border router is never translated into a
  274.           type-5 LSA, however, a default route originated by an NSSA inter-
  275.           nal  AS  boundary  router  (one  that  is not also an area border
  276.           router) may be translated into a type-5 LSA.
  277.  
  278.           It should also be noted that unlike stub areas, all OSPF  summary
  279.           routes  (type-3  LSAs)  must  be imported into NSSAs.  This is to
  280.           ensure that OSPF internal routes  are  always  chosen  over  OSPF
  281.           external (type-7) routes.
  282.  
  283.           In our  example  topology  the  subnets  of  130.57  and  network
  284.           192.31.114,  will  still be learned by RIP on router BR18 but now
  285.           both BR10 and BR18 can be in an NSSA and all of BARRNets external
  286.           routes  are  hidden  from  BR18; BR10 becomes an NSSA area border
  287.           router and BR18 becomes an AS boundary  router  internal  to  the
  288.           NSSA.   BR18  will  import  the  subnets  of  130.57  and network
  289.           192.31.114 as type-7 LSAs into the  NSSA.  BR10  then  translates
  290.           these  routes  into  type-5  LSAs  and floods them into BARRNet's
  291.           backbone.
  292.  
  293.      3.0  Implementation Details
  294.  
  295.      3.1  The N-bit
  296.  
  297.           The N-bit ensures that all members of a NSSA agree on the  area's
  298.           configuration.    Together,   the  N-bit  and  E-bit  reflect  an
  299.           interface's (and consequently the interface's associated  area's)
  300.           external  LSA  flooding capability.  As explained in section 10.5
  301.           of the  OSPF  specification,  if  type-5  LSAs  are  not  flooded
  302.           into/throughout  the  area, the E-bit must be clear in the option
  303.           field of the received Hello packets. Interfaces  associated  with
  304.           an  NSSA  will  not send or receive type-5 LSAs on that interface
  305.           but may send and receive type-7 LSAs.  Therefore, if the N-bit is
  306.           set in the options field, the E-bit must be cleared.
  307.  
  308.           To support the NSSA option an additional check must  be  made  in
  309.           the  function  that handles receiving Hello packet to verify that
  310.           both the N-bit and the E-bit found in the Hello  packet's  option
  311.           field match the value of the options that have been configured in
  312.           the receiving interface.  A mismatch in the options  causes  pro-
  313.           cessing of the received Hello packet to stop and the packet to be
  314.           dropped.
  315.  
  316.  
  317.      3.2  Type-7 Address Ranges
  318.  
  319.           NSSA area border routers may be configured  with  type-7  address
  320.           ranges.  Each address range is defined as an [address,mask] pair.
  321.           Many separate type-7 networks may then be  represented  by  in  a
  322.           single  address  range (as advertised by a type-5 LSA), just as a
  323.  
  324.  
  325.  
  326.    Coltun & Fuller           Expires May 1994                      [Page 5]
  327.  
  328.  
  329.  
  330.  
  331.  
  332.    Internet Draft            OSPF NSSA Option                  October 1993
  333.  
  334.  
  335.           subnetted network is composed of  many  separate  subnets.   Area
  336.           border  routers may then summarize type-7 routes by advertising a
  337.           single type-5 route for each type-7 address  range.   The  type-5
  338.           route,  resulting  from a type-7 address range match will be dis-
  339.           tributed to all type-5 capable  areas.   Section  4.1  gives  the
  340.           details of generating type-5 routes from type-7 address ranges.
  341.  
  342.           A type-7 address range includes the following configurable items.
  343.  
  344.                o An [address,mask] pair.
  345.  
  346.                o A status indication of either Advertise or DoNotAdvertise.
  347.  
  348.                o External route tag.
  349.  
  350.  
  351.      3.3  Type-7 LSAs: NSSA External Link-State Advertisements
  352.  
  353.           External routes are imported into NSSAs as  type-7  LSAs  by  the
  354.           NSSA's  AS  boundary  routers.   An NSSA AS boundary routers is a
  355.           router which has an interface associated with  the  NSSA  and  is
  356.           exchanging  routing information with routers belonging to another
  357.           AS.  As with type-5 LSAs a separate type-7 LSA is originated  for
  358.           each  destination network.  To support NSSA areas, the link-state
  359.           database must therefore be expanded to contain a type-7 LSA.
  360.  
  361.           Type 7-LSAs are identical to type-5 LSAs except for the following
  362.           (see  section  12.3.4  "AS external links" in the OSPF specifica-
  363.           tion).
  364.                   1. The type field in the LSA header is 7.
  365.  
  366.                   2. Type-7 LSAs are only flooded within the NSSA.
  367.                      The flooding of type-7 LSAs follow the same rules
  368.                      as the flooding of type 1-4 LSAs.
  369.  
  370.                   3. Type-7 LSAs are kept within the NSSA's LSDB (are area
  371.                      specific) whereas because type-5 LSAs are flooded to
  372.                      all type-5 capable areas, type-5 LSAs have global scope
  373.                      in the router's LSDB.
  374.  
  375.                   4. At the area border router, selected type-7 LSAs are
  376.                      translated into type 5-LSAs and flooded into the
  377.                      backbone.
  378.  
  379.                   5. Type 7 LSAs have a  propagate (P) bit which is
  380.                      used to flag the area border router to translate the
  381.                      type-7 LSA into a type-5 LSA. Examples of how the P-bit
  382.                      is used for loop avoidance are in the following sections.
  383.  
  384.                   6. Those type-7 LSAs that are to be translated into type-5
  385.                      LSAs must have their forwarding address set.
  386.                      Type-5 LSAs that have been translated from type-7 LSAs
  387.                      for the most part must contain a forwarding address.
  388.                      The execption to this is if the translation to a type-5
  389.  
  390.  
  391.  
  392.    Coltun & Fuller           Expires May 1994                      [Page 6]
  393.  
  394.  
  395.  
  396.  
  397.  
  398.    Internet Draft            OSPF NSSA Option                  October 1993
  399.  
  400.  
  401.                      LSA is the result of an address range match, in which
  402.                      case the type-5 LSA will not contain a forwarding address
  403.                      (see section 4.1 for details).
  404.                      The forwarding address contained in type-5 LSAs will
  405.                      result in more efficient routing to the AS external
  406.                      networks when there are multiple NSSA area
  407.                      border routers. Having the forwarding address in the
  408.                      type-7 LSAs will ease the translation of type-7 into
  409.                      type-5 LSAs as the NSSA area border router will
  410.                      not be required to compute the forwarding address.
  411.  
  412.                      If the network between the NSSA AS boundary router and the
  413.                      adjacent AS is advertised into OSPF as an internal OSPF
  414.                      route, the forwarding address should be the next hop
  415.                      address as is currently done in type-5 LSAs, but unlike
  416.                      type-5 LSAs if the intervening network is not advertised
  417.                      into OSPF as an internal OSPF route, the forwarding
  418.                      address should be any one of the router's active OSPF
  419.                      interface addresses.
  420.  
  421.           Type-5 and type-7 metrics and path types are directly comparable.
  422.  
  423.      3.4  Originating Type-7 LSAs
  424.  
  425.           NSSA AS boundary routers may originate  type-7  LSAs.   All  NSSA
  426.           area  border  routers must also be AS boundary routers since they
  427.           all must have the capability of translating a type-7 LSAs into  a
  428.           type-5  LSAs  (see  section  3.6 routes for the translation algo-
  429.           rithm).  NSSA area border routers must set  the  E-bit  (external
  430.           bit)  as  well  as  the B-bit (border bit) in its router (type-1)
  431.           LSAs (both in the backbone and in the NSSA area).
  432.  
  433.           When an NSSA internal AS boundary router originates a type-7  LSA
  434.           that it wants to be translated into a type-5 LSA by the NSSA area
  435.           border router (and subsequently flooded into  the  backbone),  it
  436.           must  set  the  P-bit  in  the LS header's option field and add a
  437.           valid forwarding address in the type-7 LSA.
  438.  
  439.           If a router is attached to another AS and is also  an  NSSA  area
  440.           border  router, it may originate a both a type-5 and a type-7 LSA
  441.           for the same network.  The type-5 LSA  will  be  flooded  to  the
  442.           backbone  (and  all attached type-5 capable areas) and the type-7
  443.           will be flooded into the NSSA.  If this is the  case,  the  P-bit
  444.           must  be  reset  in the type-7 NSSA so the type-7 LSA isn't again
  445.           translated into a type-5 LSA by another NSSA area border router.
  446.  
  447.           A type-7 default route (network 0.0.0.0) may be  originated  into
  448.           the  NSSA by an NSSA area border router or by an NSSA AS boundary
  449.           router which is internal to the NSSA.  The type-7  default  route
  450.           originated  by  the  NSSA  area border router must have the P-bit
  451.           reset so that the default  route  originated  by  the  NSSA  area
  452.           border router will not find its way out of the NSSA into the rest
  453.           of the AS system via another NSSA area border router.  The type-7
  454.           default  route  originated by an NSSA AS boundary router which is
  455.  
  456.  
  457.  
  458.    Coltun & Fuller           Expires May 1994                      [Page 7]
  459.  
  460.  
  461.  
  462.  
  463.  
  464.    Internet Draft            OSPF NSSA Option                  October 1993
  465.  
  466.  
  467.           not an NSSA area border router may have the  P-bit  set.   Type-7
  468.           routes  which  are originated by the NSSA area border router will
  469.           not get added to other NSSA area border router's routing table.
  470.  
  471.           A default route must not be injected into the NSSA as  a  summary
  472.           (type-3)  LSA  as  in the stub area case.  The reason for this is
  473.           that the preferred summary default route would be chosen over all
  474.           more  specific  type-7  routes.   Because summary routes are pre-
  475.           ferred to external routes and to ensure that summary  routes  are
  476.           chosen  over external within the NSSA, all summary routes (unlike
  477.           stub areas in which this is optional) must be  imported  into  an
  478.           NSSA.
  479.  
  480.      3.5 Calculating Type-7 AS External Routes
  481.  
  482.           This section is very similar  to  section  16.4  (Calculating  AS
  483.           external  routes) in the OSPF specification.  An NSSA area border
  484.           router should examine both type-5 LSAs and type-7 LSAs if  either
  485.           type-5  or  type-7 routes need to be updated.  Type-7 LSAs should
  486.           be examined after type-5 LSAs.  An NSSA  internal  router  should
  487.           examine type-7 LSAs when type-7 routes need to be recalculated.
  488.  
  489.           In relation to the  steps  to  calculate  the  routing  table  as
  490.           presented  in the OSPF specification (chapter 16, "Calculation of
  491.           the Routing Table"), type-7 LSAs should be examined after step  5
  492.           where the routes to external destinations are calculated.
  493.  
  494.           Type-7 routes are calculated by examining type-7  LSAs.  Each  of
  495.           LSAs  are considered in turn. Most type-7 LSAs describe routes to
  496.           specific IP destinations.  A  type-7  LSA  can  also  describe  a
  497.           default  route  for  the NSSA (destination = DefaultDestination).
  498.           For each type-7 LSA:
  499.  
  500.                1. If the metric specified by the LSA is LSInfinity, the
  501.                   age of the LSA equals MaxAge or the advertising router
  502.                   field is equal to this router's router ID, examine the
  503.                   next advertisement.
  504.  
  505.                2. Call the destination described by the LSA N. Look up the
  506.                   routing table entry for the AS boundary router (ASBR) that
  507.                   originated the LSA. If no entry exists for the ASBR
  508.                   (i.e., ASBR is unreachable), do nothing with this LSA and
  509.                   consider the next in the list.
  510.  
  511.                   If the destination is the default route (destination =
  512.                   DefaultDestination) and if the originator of the LSA and
  513.                   the calculating router are both NSSA area border routers
  514.                   do nothing with this LSA and consider the next in the list.
  515.  
  516.                   Else, this LSA describes an AS external path to destination
  517.                   N. If the forwarding address (as specified in the forwarding
  518.                   address field of the LSA) is 0.0.0.0, the packets routed
  519.                   to the external destination N will be routed to the
  520.                   originating ASBR. If the forwarding address is not 0.0.0.0,
  521.  
  522.  
  523.  
  524.    Coltun & Fuller           Expires May 1994                      [Page 8]
  525.  
  526.  
  527.  
  528.  
  529.  
  530.    Internet Draft            OSPF NSSA Option                  October 1993
  531.  
  532.  
  533.                   look up the forwarding address in the routing table. Packets
  534.                   routed to the external destination N will be routed within
  535.                   the NSSA to this forwarding address. An intra-area path
  536.                   must therefore exist to the forwarding address. If no such
  537.                   path exists, do nothing with the LSA and consider the next
  538.                   in the list.
  539.  
  540.                   Call the routing table distance to the forwarding address
  541.                   (or the distance to the originating ASBR if the forwarding
  542.                   address is 0.0.0.0) X, and the cost specified in the type-7
  543.                   LSA Y. X is in terms of the link-state metric, and Y is a
  544.                   Type-1 or Type-2 external metric.
  545.  
  546.                3. Now, look up the routing table entry for the destination
  547.                   N. If no entries exist for N, install the AS external path
  548.                   to N, with the next hop equal to the list of next hops to
  549.                   the forwarding address/ASBR, and the advertising router equal
  550.                   to ASBR. If the external metric type is 1, then the
  551.                   path-type is set to Type-1 external and the cost is equal
  552.                   to X + Y. If the external metric type is 2, the path-type
  553.                   is set to Type-2 external, the link-state component of the
  554.                   route's cost is X, and the Type-2 cost is Y.
  555.  
  556.                4. Else, if the paths present in the table are not Type-1 or
  557.                   Type-2 external paths, do nothing (AS external paths have
  558.                   the lowest priority).
  559.  
  560.                5. Otherwise, compare the cost of this new AS external path
  561.                   to the ones present in the table. Note that type-5 and
  562.                   type-7 routes are directly comparable. Type-1 external
  563.                   paths are always shorter than Type-2 external paths.
  564.                   Type-1 external paths are compared by looking at the sum
  565.                   of the distance to the forwarding address/ASBR and the
  566.                   advertised Type-1 paths (X+Y). Type-2 external paths are
  567.                   compared by looking at the advertised Type-2 metrics,
  568.                   and then if necessary, the distance to the forwarding
  569.                   address/ASBR.
  570.                   When a type-5 LSA and a type-7 LSA are found to have the
  571.                   same type and an equal distance, the following priorities
  572.                   apply (listed from highest to lowest) for breaking the tie.
  573.                         a. Any type 5 LSA.
  574.                         b. A type-7 LSA with the P-bit set and the forwarding
  575.                            address non-zero.
  576.                         c. Any other type-7 LSA.
  577.  
  578.                   If the new path is shorter, it replaces the present paths
  579.                   in the routing table entry. If the new path is the same
  580.                   cost, it is added to the routing table entry's list of
  581.                   paths.
  582.  
  583.  
  584.      3.6 Incremental Updates
  585.  
  586.           Incremental updates for type-7 LSAs should be treated the same as
  587.  
  588.  
  589.  
  590.    Coltun & Fuller           Expires May 1994                      [Page 9]
  591.  
  592.  
  593.  
  594.  
  595.  
  596.    Internet Draft            OSPF NSSA Option                  October 1993
  597.  
  598.  
  599.           incremental updates for type-5 LSAs (see section 16.6 of the OSPF
  600.           specification).  That is, if a new instance of a  type-7  LSA  is
  601.           received  it  is  not necessary to recalculate the entire routing
  602.           table. If there is already an OSPF internal route to the destina-
  603.           tion  represented  by  the type-7 LSA, no recalculation is neces-
  604.           sary. Otherwise, the procedure in  the  proceeding  section  will
  605.           have to be performed but only for the external routes (type-5 and
  606.           type-7) whose networks describe the same networks  as  the  newly
  607.           received LSA.
  608.  
  609.      4.0 Originating Type-5 LSAs
  610.  
  611.  
  612.      4.1 Translating Type-7 LSAs Into Type-5 LSAs
  613.  
  614.           This step is performed as part of the NSSA's Dijkstra calculation
  615.           after type-5 and type-7 routes have been calculated.  If the cal-
  616.           culating router is not an area  border  router  this  translation
  617.           algorithm  should  be skipped.  All reachable area border routers
  618.           in the NSSA should now  be  examined  noting  the  one  with  the
  619.           highest  router ID.  If this router has the highest router ID, it
  620.           will be the one translating type-7 LSAs into type-5 LSAs for  the
  621.           NSSA,  otherwise  the  translation  algorithm  should not be per-
  622.           formed.
  623.  
  624.           All type-7 routes that have  been  added  to  the  routing  table
  625.           should be examined.  If the type-7 LSA (associated with the route
  626.           being examined) has the  P-bit  set  and  a  non-zero  forwarding
  627.           address, the following steps should be taken.
  628.  
  629.                The translation procedure must first check for a  configured
  630.                type-7  address  range.  Recall that an type-7 address range
  631.                consists of an [address,mask] pair and a  status  indication
  632.                of  either  Advertise  or  DoNotAdvertise.  At most a single
  633.                type-5 LSA is made for each range.  If the route being exam-
  634.                ined   falls   within   the   type-7   address  range,  (the
  635.                [address,mask] pair of the route equal to or a more specific
  636.                instance  of  the  [address,mask] pair of the type-7 address
  637.                range), one of following three actions may take place.
  638.  
  639.                     1. When the range's status indicates Advertise and the
  640.                        route's address and mask are equal to the address
  641.                        and mask of the type-7 range a type-5 LSA should be
  642.                        originated if:
  643.  
  644.                        o there currently is no type-5 LSA originated from
  645.                          this router corresponding to the type-7 LSA,
  646.  
  647.                        o the path type or the metric in the corresponding
  648.                          type-5 LSA is different from the type-7 LSA or
  649.  
  650.                        o The forwarding address in the corresponding
  651.                          type-5 LSA is different from the type-7 LSA.
  652.  
  653.  
  654.  
  655.  
  656.    Coltun & Fuller           Expires May 1994                     [Page 10]
  657.  
  658.  
  659.  
  660.  
  661.  
  662.    Internet Draft            OSPF NSSA Option                  October 1993
  663.  
  664.  
  665.                        The newly originated type-5 LSA will describe
  666.                        the same network and have the same network mask,
  667.                        metrics, forwarding address, external route tag
  668.                        and path type as the type-7 LSA, however, the
  669.                        advertising router field will be the router ID
  670.                        of this area border router.
  671.  
  672.                     2. When the range's status indicates Advertise and the
  673.                        route's address or mask indicates a more specific
  674.                        route (i.e., the route's address is subsumed by the
  675.                        range or the route has a longer mask), a type-5 LSA
  676.                        is generated with link-state ID equal to the range's
  677.                        address (if necessary, the link-state ID can also have
  678.                        one or more of the range's "host" bits set; see
  679.                        Appendix F of the OSPF specification for details),
  680.                        the network mask, external route tag and
  681.                        path type will be set to the configured type-7 range
  682.                        values. The advertising router field will be the
  683.                        router ID of this area border router.
  684.                        The forwarding address will not be set.
  685.                        The path type should always be set to the highest
  686.                        path type that is subsumed by the net range.
  687.                        The metric for the type-5 LSA will be set as follows:
  688.  
  689.                        o if the path type is externl type 2, the type-5
  690.                          metric should be set to the largest type-7 metric
  691.                          subsumed by this net range + 1.
  692.  
  693.                        o if the path type is external type 1, the type-5
  694.                          metric should be set to the largest metric.
  695.  
  696.                        For example, given a net range of [10.0.0.0, 255.0.0.0]
  697.                        for an area that has type-7 routes of:
  698.                              10.1.0.0 path type 1, metric 10
  699.                              10.2.0.0 path type 1, metric 11
  700.                              10.3.0.0 path type 2, metric 5
  701.                        a type-5 LSA will be generated with a path type of 2
  702.                        and a metric of 6.
  703.  
  704.                        As another example, given a net range of
  705.                        [10.0.0.0, 255.0.0.0] for an area that has
  706.                        type-7 routes of:
  707.                              10.1.0.0 path type 1, metric 10
  708.                              10.2.0.0 path type 1, metric 11
  709.                              10.3.0.0 path type 1, metric 5
  710.                        a type-5 LSA will be generated with a path type of 1
  711.                        and a metric of 11.
  712.  
  713.                        These metric and path type rules will avoid routing
  714.                        loops in the event that path type 1 and 2 are both
  715.                        used within the area.
  716.  
  717.                     3. When the range's status indicates DoNotAdvertise,
  718.                        the type-5 LSA is suppressed and the component networks
  719.  
  720.  
  721.  
  722.    Coltun & Fuller           Expires May 1994                     [Page 11]
  723.  
  724.  
  725.  
  726.  
  727.  
  728.    Internet Draft            OSPF NSSA Option                  October 1993
  729.  
  730.  
  731.                        remain hidden from the rest of the AS.
  732.  
  733.                By default (given that the P-bit is set and the  LSA  has  a
  734.                non-zero  forwarding  address) if a network is not contained
  735.                in any explicitly configured  address  range,  a  type-7  to
  736.                type-5 LSA translation will occur.
  737.  
  738.                A new instance of a type-5  LSA  should  be  originated  and
  739.                flooded  to  all attached type-5 capable areas if one of the
  740.                following is true.
  741.  
  742.                     1. There currently is no type-5 LSA originated from this
  743.                        router corresponding to the type-7 LSA.
  744.  
  745.                     2. The path type or the metric in the corresponding
  746.                        type-5 LSA is different from the type-7 LSA.
  747.  
  748.                     3. The forwarding address in the corresponding
  749.                        type-5 LSA is different from the type-7 LSA.
  750.  
  751.                The newly originated type-5 LSAs will describe the same net-
  752.                work  and  have  the  same network mask, metrics, forwarding
  753.                address, external route tag and path type as the type-7 LSA.
  754.                The  advertising  router field will be the router ID of this
  755.                area border router.
  756.  
  757.           As with all newly originated type-5 LSAs, a type-5  LSA  that  is
  758.           the  result  of  a  type-7 to type-5 translation (type-7 range or
  759.           default case) is flooded to all attached type-5 capable areas.
  760.  
  761.  
  762.      4.2 Flushing Translated Type-7 LSAs
  763.  
  764.           If an NSSA area border router has translated a type-7  LSA  to  a
  765.           type-5  LSA  that  should no longer be translated, the type-5 LSA
  766.           should be flushed (set to MaxAge and  flooded).   The  translated
  767.           type-5  LSA  should  be  flushed whenever the routing table entry
  768.           that caused the translation changes so that  either  the  routing
  769.           table entry is unreachable or the entry's associated LSA is not a
  770.           type-7 with the P-bit set and a non-zero forwarding address.
  771.  
  772.      5.0 Acknowledgements
  773.  
  774.           This document was produced by the OSPF Working Group, chaired  by
  775.           John Moy.
  776.  
  777.           In addition, the comments of the following individuals  are  also
  778.           acknowledged:
  779.                   Phani Jajjarvarpu  cisco
  780.                   Dino Farinacci     cisco
  781.                   Jeff Honig         Cornell University
  782.                   John Moy           Proteon, Inc.
  783.                   Doug Williams      IBM
  784.  
  785.  
  786.  
  787.  
  788.    Coltun & Fuller           Expires May 1994                     [Page 12]
  789.  
  790.  
  791.  
  792.  
  793.  
  794.    Internet Draft            OSPF NSSA Option                  October 1993
  795.  
  796.  
  797.      6.0 References
  798.  
  799.              [OSPF]    Moy, J. OSPF Version 2. Internet Draft
  800.                        draft-ietf-ospf-version2-04.txt September 1993.
  801.              [MOSPF]   Moy, J. Multicast Extensions to OSPF. Internet Draft
  802.                        draft-ietf-mospf-multicast-03.txt March 1993.
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.    Coltun & Fuller           Expires May 1994                     [Page 13]
  855.  
  856.  
  857.  
  858.  
  859.  
  860.    Internet Draft            OSPF NSSA Option                  October 1993
  861.  
  862.  
  863.      Appendix A: Type-7 Packet Format
  864.  
  865.                    0                                32
  866.                    -----------------------------------
  867.                    |                | OPTS   |   7   |
  868.                    |                ------------------
  869.                    |        Link-State Header        |
  870.                    |                                 |
  871.                    -----------------------------------
  872.                    | Network Mask                    |
  873.                    -----------------------------------  ______
  874.                    |E| Tos  |        metric          |  .
  875.                    -----------------------------------  .  repeated for each TOS
  876.                    | Forwarding Address              |  .
  877.                    -----------------------------------  .
  878.                    | External Route Tag              |  ______
  879.                    -----------------------------------
  880.  
  881.           The definitions of the link-state ID, network mask,  metrics  and
  882.           external route tag are the same as the definitions for the type-5
  883.           LSAs (see A.4.5 in the OSPF specification) except for:
  884.  
  885.                The Forwarding Address
  886.           If the network between the NSSA AS boundary router and the  adja-
  887.           cent  AS  is  advertised into OSPF as an internal OSPF route, the
  888.           forwarding address should be the next  hop  address  but  if  the
  889.           intervening  network  is  not advertised into OSPF as an internal
  890.           OSPF route, the forwarding address  should  be  any  one  of  the
  891.           router's active OSPF interface addresses.
  892.  
  893.  
  894.      Appendix B: The Options Field
  895.  
  896.           The OSPF options field is present in OSPF Hello packets, Database
  897.           Description packets and all link-state advertisements. See appen-
  898.           dix A.2 in the OSPF specification for  a  description  of  option
  899.           field.
  900.  
  901.  
  902.                    ------------------------------------
  903.                    | * | * | * | * | N/P | MC | E | T |
  904.                    ------------------------------------
  905.  
  906.                        The Type-7 LSA options field
  907.  
  908.  
  909.              T-bit:  The T-bit describes the router's TOS capability.
  910.  
  911.              E-bit:  Type-5 AS external link advertisements are not
  912.                      flooded into/through OSPF stub and NSSA areas.
  913.                      The E-bit ensures that all members of a stub area
  914.                      agree on that area configuration. The E-bit is
  915.                      meaningful only in OSPF Hello packets. When the
  916.                      E-bit is reset in the Hello packet sent out a
  917.  
  918.  
  919.  
  920.    Coltun & Fuller           Expires May 1994                     [Page 14]
  921.  
  922.  
  923.  
  924.  
  925.  
  926.    Internet Draft            OSPF NSSA Option                  October 1993
  927.  
  928.  
  929.                      particular interface, it means that the router
  930.                      will neither send nor receive type-5 AS external
  931.                      link state advertisements on that interface (in other
  932.                      words, the interface connects to a stub area). Two
  933.                      routers will not become neighbors unless they agree
  934.                      on the state of the E-bit.
  935.  
  936.              MC-bit: The MC-bit describes the multicast capability of the
  937.                      various pieces of the OSPF routing domain [MOSPF].
  938.  
  939.              N-bit:  The N-bit describes the the router's NSSA capability.
  940.                      The N-bit is used only in Hello packets and ensures
  941.                      that all members of an NSSA agree on that area's
  942.                      configuration. When the N-bit is reset in the Hello
  943.                      packet sent out a particular interface, it means
  944.                      that the router will neither send nor receive
  945.                      type-7 LSAs on that interface. Two routers will not
  946.                      form an adjacency unless they agree on the state
  947.                      of the N-bit. If the N-bit is set in the options
  948.                      field, the E-bit must be reset.
  949.  
  950.              P-bit:  The P-bit is used only in the type-7 LSA header.
  951.                      It flags the NSSA area border router to translate the
  952.                      type-7 LSA into a type-5 LSA.
  953.  
  954.  
  955.  
  956.      Appendix C:  Configuration Parameters
  957.  
  958.           Appendix C.2 in the OSPF specification lists the area parameters.
  959.           The area ID, list of address ranges for type-3 summary routes and
  960.           authentication type remain unchanged.  Section 3.2 of this  docu-
  961.           ment  lists  the  configuration  parameters  for  type-7  address
  962.           ranges.
  963.  
  964.           For NSSAs the external capabilities of the area must  be  set  to
  965.           accept  type-7 external routes.  Additionally there must be a way
  966.           of configuring the NSSA area border  router  to  send  a  default
  967.           route into the NSSA using a specific metric (type-1 or type-2 and
  968.           the actual cost).
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.    Coltun & Fuller           Expires May 1994                     [Page 15]
  987.  
  988.  
  989.